#!/bin/sh

. ./topsail.conf

case $1 in
	start)
#		kill -9 `cat $PID_FILE`
		./topsail -f ./topsail.conf
		if [ "$?" -eq 0 ]; then
			echo "Topsail started."
		fi
		;;
	stop)
		kill -9 `cat $PID_FILE`
		if [ "$?" -eq 0 ] ; then
			echo "Topsail stopped."
		fi
		;;
	*)
		echo "Usage: ./ctl-topsail (start|stop)"
		;;
esac
